package com.dagger.weapon.controller;

import com.dagger.weapon.service.ChannelsService;
import com.dagger.weapon.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/index")
@Api(value = "提供创建文章频道列表接口",tags = "文章频道列表")
public class indexController {

    @Autowired
    private ChannelsService channelsService;

    @GetMapping("/channels")
    @ApiOperation("获取创建文章频道列表接口")
    public ResultVO listChannels(){
        return channelsService.listChannels();

    }

}
